跳到主要内容

ECMA_CEILING

Rounds the number up to the nearest multiple of significance. Negative numbers are rounded towards zero.

Syntax

expression.ECMA_CEILING(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRangeApiNamenumber
arg2RequiredApiRangeApiNamenumber

Returns

number

Example

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.ECMA_CEILING(1.567, 0.1));